# Maintainer: Leonidas Spyropoulos <artafinde at archlinux dot org>

pkgname=vulture
pkgver=2.7
pkgrel=2
pkgdesc="Finds dead code in Python projects"
arch=('any')
url="https://github.com/jendrikseipp/vulture"
license=('MIT')
depends=(python-coverage python-setuptools python-pint python-toml)
makedepends=(python-build python-installer python-poetry-core python-wheel)
checkdepends=(python-tox)
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
sha256sums=('ae0268f49b680b0f75318aab63af71a6a050e51150789b30d3be7b37cb03c37d')
b2sums=('ef2462b11472e88494abcbe2d060b64e1000ad0be2d9939ca50ac78202136f498d5c584bf2c989d6da1c5d5ca53196b8d359e5f9c8495106f9a119b24ffd8311')

build() {
  cd "${pkgname}"-"${pkgver}"
  python -m build --wheel --no-isolation
}

check() {
  cd "${pkgname}"-"${pkgver}"
  python -m tox -e py
}

package() {
  cd "${pkgname}"-"${pkgver}"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -vDm 644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim:set ts=2 sw=2 et:
